package com.biz.primus.ms.product.feign;

import com.biz.primus.model.price.vo.BatchPriceVo;
import com.biz.primus.base.vo.PriceVo;
import com.biz.primus.model.price.vo.PriceReqVo;
import com.biz.primus.model.price.vo.UpdatePriceVo;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author defei
 * @date 2017/9/13
 */
@FeignClient( name = "service-price")
public interface PriceFeignClient {

    @PostMapping("soa/priceService/prices")
    BatchPriceVo prices(@RequestBody PriceReqVo priceReqVo);

    @PostMapping("findByIdsWithNull")
    List<PriceVo> findByIdsWithNull(@RequestBody List<String> strings);

    @GetMapping("searchProduct")
    PriceVo getTypeAPrice(@RequestParam("productCode") String productCode);

    @GetMapping("findOne")
    PriceVo findOne(@RequestParam("id") String format);

    @PostMapping("findByIds")
    List<PriceVo> findByIds(@RequestBody List<String> priceRoIds);

    @PostMapping("getTypeAPrices")
    List<PriceVo> getTypeAPrices(@RequestBody List<String> productCodes);

    @GetMapping("getPriceRoId")
    String getPriceRoId(@RequestParam("productCode") String productCode, @RequestParam("areaNo") String areaNo);

    @PostMapping("updateProductPrice")
    void updateProductPrice(@RequestBody UpdatePriceVo apply);

    @GetMapping("getTypeBPrice")
    PriceVo getTypeBPrice(@RequestParam("productCode") String productCode, @RequestParam("areaNo") String areaNo);

    @PostMapping("batchPrices")
    BatchPriceVo typeBPrices(@RequestBody List<String> productCodes,@RequestParam("depotArea") String depotArea,
                             @RequestParam("warehouseArea") String warehouseArea);



}
